package com.coder.books.thinkinjava.io;

import com.coder.util.Directory;
import com.coder.util.PPrint;

import java.io.File;

import static com.coder.util.Print.println;


/**
 *
 * @author yuhushuan
 * @date 2020/8/19 12:38
 */
public class DirectoryDemo {
    public static void main(String[] args) {
        PPrint.println(Directory.walk(".").dirs);

        for (File file : Directory.walk(".").dirs) {
            println(file);
        }

        println("--------------------");

        for (File file : Directory.walk(".", ".*\\.java")) {
            println(file);
        }

        println("=====================");
        for (File file : Directory.walk(".", "[Zz]].*\\.class")) {
            println(file);
        }
    }
}
